<!doctype html>
<html>

  <head>
    <meta charset="UTF-8">
    <title>礼品换积分</title>
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <link href="../css/mui.min.css" rel="stylesheet" />
    <style>
      html {
        font-family: Roboto, Arial, "Noto Sans CJK SC", "Noto Sans CJK TC", "Pingfang SC", "Microsoft Yahei", "WenQuanYi Micro Hei", sans-serif;
      }
      
      body {
        overflow-x: hidden;
        background-color: #fff !important;
      }
      
      .mui-content {
        background-color: #fff;
      }
      
      .out-box {
        width: 90%;
        margin-left: 5%;
        height: 80px;
        font-size: 13px;
        text-align: center;
        margin-top: 20px;
        padding-top: 32px;
      }
      
      .out-box:active {
        background-color: #F2F2F2;
      }
      
      .lit-span {
        font-size: 12px;
      }
      
      .journal {
        position: absolute;
        width: 100%;
        bottom: 10px;
        text-align: center;
        font-size: 14px;
      }
      .vux-1px{
      	border: 1px dashed #ccc;
      	border-radius: 5px;
      }
    </style>
  </head>

  <body>
    <div class="mui-content" id="app">
      <div class="mui-row">
        <div class="mui-col-sm-6 mui-col-xs-6">
          <div class="vux-1px out-box integral error-type">
            <p>娃娃换积分</p>
          </div>
        </div>
        <!--<div class="mui-col-sm-6 mui-col-xs-6">
          <div class="vux-1px out-box ticket error-type">
            <p>彩票换积分</p>
          </div>
        </div>-->
        <!--<div class="mui-col-sm-6 mui-col-xs-6" v-show="ifShow">
          <div class="vux-1px out-box recovery error-type">
            <p>娃娃回库房</p>
          </div>
        </div>-->
      </div>
      <div class="journal">
        <a @click="linkTo('娃娃回收日志','./exchange-journal.html','exchange-journal')">礼品回收日志</a>&emsp;&emsp;&nbsp;
        <!--<a @click="linkTo('彩票回收日志','./lotteryExchange-journal.html','lotteryExchange-journal')">彩票回收日志</a>-->
      </div>
    </div>
    <script src="../js/mui.min.js"></script>
    <script src="../js/vue.min.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript">
      mui.init()
      mui.plusReady(function() {
        var vm = new Vue({
          el: '#app',
          data: {
            ifShow: true,
            currentShopObj: {}
          },
          created: function() {
            this.receiveParams()
          },
          mounted: function() {
            var _this = this
            document.querySelector(".integral").addEventListener('tap', function() {
              _this.linkTo('娃娃换积分', './search-user.html', 'search-user',1)
            })
//          document.querySelector('.recovery').addEventListener('tap', function() {
//            _this.linkTo('礼品回库房', './return.html', 'return','')
//          })
//						document.querySelector(".ticket").addEventListener('tap', function() {
//            _this.linkTo('彩票换积分', './search-user.html', 'search-user',2)
//          })
          },
          methods: {
            receiveParams: function() {
              var self = plus.webview.currentWebview()
              this.currentShopObj = self.currentShopObj;
            },
            linkTo: function(title, url, id, type) {
              mui.openWindow({
                url: url,
                id: id,
                styles: {
                  top: 0, //新页面顶部位置
                  bottom: 0, //新页面底部位置         
                  titleNView: {
                    titleText: title,
                    titleColor: "#FFFFFF",
                    titleSize: "17px",
                    backgroundColor: "#FF6800",
                    autoBackButton: true,
                    //                homeButton: true,
                    buttons: [{
                      float: "right",
                      fontSize: "18px",
                      fontSrc: "_www/fonts/iconfont.ttf", //wap2app内置字体文件
                      text: "\ue602",
                      onclick: function() {
                        var allPage = plus.webview.all()
                        var nowPage = plus.webview.getWebviewById('index')
                        for(var i = 0; i < allPage.length; i++) {
                          if(allPage[i].getURL() !== nowPage.getURL()) {
                            plus.webview.close(allPage[i]);
                          }
                        }
                      }
                    }],
                    splitLine: {
                      color: "#CCCCCC",
                      height: "1px"
                    }
                  }
                },
                extras: {
                  currentShopObj: this.currentShopObj,
                  type: type
                }
              })
            }
          }
        })
      })
    </script>
  </body>

</html>